import {useSize} from "element-plus";
import {computed} from "vue";

export default function StaticSelector({options, width = "120px", size}, {attrs}) {
  const itemSize = useSize()
  const elSize = computed(() => size || itemSize.value)
  return (
      <el-select
          style={{width}}
          size={elSize.value}
          clearable
          {...attrs}
      >
        {
          options.map(item => (
              <el-option key={item.value} label={item.label} value={item.value}/>
          ))
        }
      </el-select>
  )
}
